<div class="grid-list page-content ">
	<form nz-form [formGroup]="validateForm" class="page-header">
		<div nz-row [nzGutter]="24">
			<div nz-col [nzSpan]="6">
				<nz-form-item>
					<nz-form-label nzFor="contractNumber">姓名</nz-form-label>
					<nz-form-control>
						<input nz-input placeholder="请填写" formControlName="contractNumber" />
					</nz-form-control>
				</nz-form-item>
			</div>

			<div nz-col [nzSpan]="6" [nzOffset]="12">
				<nz-form-item style="float: right;">
					<button *ngIf="authList.includes(authEnum['GRID_LIST_' + griderType + '_VIEW'])" 
					nz-button style="margin-right: 10px;" (click)="onSearch(true)">
						<i nz-icon nzType="search"></i>
						搜索
					</button>
					<button *ngIf="authList.includes(authEnum['GRID_LIST_' + griderType + '_ADD'])" nz-button nzType="primary" (click)="add()">
						<i nz-icon nzType="plus"></i>
						新增
					</button>
				</nz-form-item>
			</div>

		</div>

	</form>


	<nz-table #basicTable [nzData]="data" [nzBordered]="true" [nzShowPagination]="false" nzSize="middle"
		[nzScroll]="{y:  'calc(100vh - 190px'}" [nzLoading]="nzLoading" [nzPageSize]="page.limit">
		<thead>
			<tr>
				<th nzAlign="center" nzWidth="50px">序号</th>
				<th nzAlign="center" nzWidth="auto">姓名</th>
				<th nzAlign="center" nzWidth="auto">网格员类型</th>
				<th nzAlign="center" nzWidth="auto">手机号码</th>
				<th nzAlign="center" nzWidth="160px">用户性别</th>
				<th nzAlign="center" nzWidth="200px">出生年月日</th>
				<th nzAlign="center" nzWidth="180px">操作</th>
			</tr>
		</thead>
		<tbody>
			<tr *ngFor="let item of basicTable.data; let i = index;">
				<td nzAlign="center">{{ i + 1}}</td>
				<td nzAlign="center">
					{{item.name}}
				</td>
				<td nzAlign="center">
					{{grider[item.griderType]}}
				</td>
				<td nzAlign="center">
					{{item.contractNumber}}
				</td>
				<td nzAlign="center">
					{{genderEnum[item.gender] || ''}}
				</td>
				<td nzAlign="center">
					{{item.birthdate }}
				</td>
				<td nzAlign="center">
					<ng-container *ngIf="authList.includes(authEnum['GRID_LIST_' + griderType + '_EDIT'])">
						<a (click)="add(item)">编辑</a>
					</ng-container>
					<nz-divider *ngIf="authList.includes(authEnum['GRID_LIST_' + griderType + '_EDIT']) && authList.includes(authEnum['GRID_LIST_' + griderType + '_DEL'])" nzType="vertical"></nz-divider>
					<ng-container *ngIf="authList.includes(authEnum['GRID_LIST_' + griderType + '_DEL'])">
						<a nz-popconfirm nzPopconfirmTitle="确定删除吗?" (nzOnConfirm)="del(item)">删除</a>
					</ng-container>
				</td>
			</tr>
		</tbody>
	</nz-table>

	<div class="page-pagination">
		<span *ngIf="page.total">共{{page.total}}条数据</span>
		<nz-pagination [(nzPageIndex)]="page.page" [nzTotal]="page.total" nzShowQuickJumper nzShowSizeChanger
			[(nzPageSize)]="page.limit" (nzPageIndexChange)="onSearch()" (nzPageSizeChange)="onSearch(true)">
		</nz-pagination>
	</div>

</div>